package com.qf.lanzhou.blog.api.pojo.entity;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;

/**
 * @author Yeach-chen
 * @ClassName Article
 */
public class Article {
    private long articleId;
    private String articleName;
    private String articleContain;
    private long articleFlag;
    private long articleLike;
    private long articleView;
    private String articleAuthor;
    private String articleIntroduction;
    private long articleLikeFlag;
    private long articleCollectFlag;
    private Timestamp articleCreatetime;
    private Timestamp articleUpdatetime;
    private String articleProduce;
    private String articleCreatetimeStr;
    private SimpleDateFormat sdf;
    private String tagSelectName;

    public String getArticleProduce() {
        return articleProduce;
    }

    public void setArticleProduce(Timestamp articleCreatetime) {
        sdf=new SimpleDateFormat("yyyy-MM-dd");
        String format = sdf.format(articleCreatetime);
        this.articleProduce=format;
    }

    public Article() {
    }

    public long getArticleLike() {
        return articleLike;
    }

    public void setArticleLike(long articleLike) {
        this.articleLike = articleLike;
    }

    public long getArticleId() {
        return articleId;
    }

    public void setArticleId(long articleId) {
        this.articleId = articleId;
    }

    public String getArticleName() {
        return articleName;
    }

    public void setArticleName(String articleName) {
        this.articleName = articleName;
    }

    public String getArticleContain() {
        return articleContain;
    }

    public void setArticleContain(String articleContain) {
        this.articleContain = articleContain;
    }

    public long getArticleFlag() {
        return articleFlag;
    }

    public void setArticleFlag(long articleFlag) {
        this.articleFlag = articleFlag;
    }

    public long getArticleView() {
        return articleView;
    }

    public void setArticleView(long articleView) {
        this.articleView = articleView;
    }

    public String getArticleAuthor() {
        return articleAuthor;
    }

    public void setArticleAuthor(String articleAuthor) {
        this.articleAuthor = articleAuthor;
    }

    public String getArticleIntroduction() {
        return articleIntroduction;
    }

    public void setArticleIntroduction(String articleIntroduction) {
        this.articleIntroduction = articleIntroduction;
    }

    public long getArticleLikeFlag() {
        return articleLikeFlag;
    }

    public void setArticleLikeFlag(long articleLikeFlag) {
        this.articleLikeFlag = articleLikeFlag;
    }

    public long getArticleCollectFlag() {
        return articleCollectFlag;
    }

    public void setArticleCollectFlag(long articleCollectFlag) {
        this.articleCollectFlag = articleCollectFlag;
    }

    public Timestamp getArticleCreatetime() {
        return articleCreatetime;
    }

    public void setArticleCreatetime(Timestamp articleCreatetime) {
        this.articleCreatetime = articleCreatetime;
    }

    public Timestamp getArticleUpdatetime() {
        return articleUpdatetime;
    }

    public void setArticleUpdatetime(Timestamp articleUpdatetime) {
        this.articleUpdatetime = articleUpdatetime;
    }

    @Override
    public String toString() {
        return "Article{" +
                "articleId=" + articleId +
                ", articleName='" + articleName + '\'' +
                ", articleContain='" + articleContain + '\'' +
                ", articleFlag=" + articleFlag +
                ", articleLike=" + articleLike +
                ", articleView=" + articleView +
                ", articleAuthor='" + articleAuthor + '\'' +
                ", articleIntroduction='" + articleIntroduction + '\'' +
                ", articleLikeFlag=" + articleLikeFlag +
                ", articleCollectFlag=" + articleCollectFlag +
                ", articleCreatetime=" + articleCreatetime +
                ", articleUpdatetime=" + articleUpdatetime +
                ", articleProduce='" + articleProduce + '\'' +
                ", articleCreatetimeStr='" + articleCreatetimeStr + '\'' +
                ", sdf=" + sdf +
                ", tagSelectName='" + tagSelectName + '\'' +
                '}';
    }

    public String getTagSelectName() {
        return tagSelectName;
    }

    public void setTagSelectName(String tagSelectName) {
        this.tagSelectName = tagSelectName;
    }

    public String getArticleCreatetimeStr() {
        return articleCreatetimeStr;
    }

    public void setArticleCreatetimeStr(Timestamp articleCreatetime) {
        sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String articleCreatetimeStr = sdf.format(articleCreatetime);
        this.articleCreatetimeStr = articleCreatetimeStr;
    }
}
